Skip to content

pandas 3 support: convert Arrow extension columns; lift pandas<3 pin - #8

Open
jefferis wants to merge 2 commits into
ci-provision-pandas-pinfrom
pandas3-support
Open

pandas 3 support: convert Arrow extension columns; lift pandas<3 pin#8
jefferis wants to merge 2 commits into
ci-provision-pandas-pinfrom
pandas3-support

Conversation

@jefferis

Copy link
Copy Markdown
Member

Stacked on #7 — base is ci-provision-pandas-pin, not main. Merge #7 first; GitHub will then retarget this to main and the diff collapses to just the two commits below. Hold until the wider ecosystem is ready for pandas 3.

Changes

  • R/convert.Rpandas2df() now converts pandas extension-array columns that reticulate leaves as raw python objects, in particular pandas 3.0's default Arrow-backed string dtype (PDEP-14): string columns become R character vectors, and other Arrow columns (e.g. int64[pyarrow] ids) map to the same R types as their native-dtype equivalents. New is_string_dtype() helper + tests exercising string[pyarrow] and int64[pyarrow].
  • R/env.R — lift the pandas < 3 pin back to pandas, now that pandas2df() handles the Arrow dtype; NEWS/comment updated.

Verification

Verified on CI against real pandas 3.0.5 (via a temporary unpin during development): test-coverage FAIL 0 SKIP 0 PASS 140; R-CMD-check FAIL 0 SKIP 3 (the pyarrow-gated Arrow tests skip only where pyarrow is absent).

Recover pandas extension-array columns that reticulate leaves as raw python
objects -- above all pandas 3.0's default Arrow-backed string dtype (PDEP-14).
String columns (is_string_dtype: str/string/large_string family) become R
character vectors; other Arrow columns (e.g. int64[pyarrow]) are classified
like object columns, so Arrow-backed ids map to the same R types as native
ones. Adds tests using explicit Arrow dtypes (reproducing the ArrowStringArray
under pandas 2 + pyarrow) and regenerates pandas2df.Rd.
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.47%. Comparing base (f226dda) to head (40ac2de).

Files with missing lines Patch % Lines
R/env.R 0.00% 2 Missing ⚠️
R/convert.R 90.00% 1 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                     @@
##           ci-provision-pandas-pin       #8      +/-   ##
===========================================================
+ Coverage                    66.18%   67.47%   +1.28%     
===========================================================
  Files                            6        6              
  Lines                          485      495      +10     
===========================================================
+ Hits                           321      334      +13     
+ Misses                         164      161       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant